{% set location = 'account' %}
{% extends 'layout.html' %}
{% from "_page.html" import message, paginate, status_label %}
{% block title %}
用户列表
{% endblock %}
{% block content %}
<ul class="breadcrumb">
    <li><a href="{{url_for('account_backend.index')}}">用户列表</a></li>
</ul>
<a class="btn" href="{{url_for('account_backend.new')}}">创建新用户</a>
<table class="table table-striped">
    <thead>
    <tr>
        <th>用户名</th>
        <th>邮箱</th>
        <th>加入时间</th>
        <th>状态</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    {%for user in page_obj.items%}
    <tr>
        <td><a href="" target="_blank">{{user.username}}</a></td>
        <td>{{user.email}}</td>
        <td>{{user.created}}</td>
        <td>
            {{status_label(user.active,user.status_message)}}
        </td>
        <td><a href="{{url_for('account_backend.edit',id=user.id)}}">Edit</a></td> 
    </tr>
    {%endfor%}
    </tbody>
</table>
{{paginate(page_obj)}}
{% endblock %}
